package com.ruoyi.quartz.task;

import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.quartz.service.ISysJobService;
import com.ruoyi.system.service.ISysLogininforService;
import com.ruoyi.system.service.ISysOperLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * 定时任务调度测试
 *
 * @author ruoyi
 */
@Component("clearLogTask")
public class ClearLogTask
{

    @Autowired
    private ISysJobService jobService;

    @Autowired
    private ISysLogininforService logininforService;

    @Autowired
    private ISysOperLogService operLogService;

    //清除3个月之前的登录和操作日志
    public void clearOpenAndLoginLog()
    {
        logininforService.cleanLogininforQuarter();
        operLogService.cleanLogininforQuarter();
    }
}
